package com.situ.mall.mapper;

import com.situ.mall.pojo.entity.Order;
import com.situ.mall.pojo.entity.OrderItem;
import com.situ.mall.pojo.query.OrderQuery;
import com.situ.mall.pojo.vo.OrderCountVO;
import com.situ.mall.pojo.vo.OrderVO;
import com.situ.mall.pojo.vo.OrderVOAdmin;
import com.situ.mall.pojo.vo.SalesVolumeVO;

import java.util.List;

public interface OrderMapper {
    int deleteByPrimaryKey(Long orderNo);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Long orderNo);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    List<OrderVO> list(OrderQuery orderQuery);

    List<Order> selectByPage(OrderQuery orderQuery);

    List<OrderItem> orderItemByOrderNo(Long orderNo);

    List<OrderVOAdmin> selectByPageAdmin(OrderQuery orderQuery);

    void deleteById(Integer id);

    List<SalesVolumeVO> TotalSalesByDay();

    Integer totalCost();

    Integer getLastOrderedProductIdByUser(int userId);

    Integer checkUserOrder(Integer userId);

    List<OrderCountVO> selectTotalOrder();
}